function lengthOfLongestSubstring(s: string): number {
    let res = 0;
    for (let i = 0; i < s.length; i++){
        let temp = '';
        for (let j = i; j < s.length; j++){
            if (temp.includes(s[j])) {
                break;
            }
            temp = temp + s[j];
            res = Math.max(res, temp.length);
        }
    }
    return res;
};
